<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="ranking">
<html>
<head>
    <title>Disciplina Algoritmos Avançados - Ranking Interno - UFCG</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UFT-8"/>
    <link rel="stylesheet" type="text/css" href="css/ranking.css" />
    <link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />

    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
    <script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script>

    <script type="text/javascript">
    _uacct = "UA-6028224-1";
    urchinTracker();
    </script>

    <script type="text/javascript">
    $(function() {
        $('.graph').lightBox();
    });
    </script>

</head>
<body>
<div class="title">Ranking Interno - UFCG - <xsl:value-of select="lastUpdated"/></div>
<table>
<tr class="header">
 <td>Posição Interna</td>
 <td>Posição Geral</td>
 <td>Progresso</td>
 <td>Usuário</td>
 <td>Problemas Resolvidos</td>
 <td>Tentativas</td>
 <td>Total Submissões</td>
 <td>Gráficos</td>
</tr>
<xsl:for-each select="result">
<tr>
  <td><xsl:value-of select="local"/></td>
  <td><xsl:value-of select="rank"/></td>
  <xsl:choose>
    <xsl:when test="progress &gt; 0">
      <td class="positive">
        <xsl:value-of select="progress"/>
      </td>
    </xsl:when>
    <xsl:when test="progress &lt; 0">
      <td class="negative">
        <xsl:value-of select="progress"/>
      </td>
    </xsl:when>
    <xsl:otherwise>
      <td><xsl:value-of select="progress"/></td>
    </xsl:otherwise>
  </xsl:choose>
  <td style="text-align: left;">
    <a>
      <xsl:attribute name="href">
http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&amp;page=show_authorstats&amp;userid=<xsl:value-of select="user-id"/>
      </xsl:attribute>
      <xsl:value-of select="user-name"/>
    </a>
  </td>
  <td><xsl:value-of select="problems-solved"/></td>
  <td><xsl:value-of select="problems-tried"/></td>
  <td><xsl:value-of select="total-submissions"/></td>
  <td>
     <a class="graph">
      <xsl:attribute name="href">
users/<xsl:value-of select="user-id"/>.png
      </xsl:attribute>
      <img src="images/chart.png" style="border: 0px #000000 solid;"/>
     </a>
  </td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
